solve by completing the square